package com.lsl.decorator.decorator2.condiment;

import com.lsl.decorator.decorator2.burger.Hamburger;

/**
 * 辣椒（装饰者的第二层）
 *
 * @author liusl104
 */
public class Chilli extends Condiment {
    private Hamburger hamburger;

    public Chilli(Hamburger hamburger) {
        this.hamburger = hamburger;
    }

    @Override
    public String getName() {
        return hamburger.getName() + "加辣椒";
    }

    @Override
    public double getPrice() {
        return hamburger.getPrice();
    }
}
